﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO.Ports;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WindowsFormsApp2.ModbusRtuSet
{
    public class ModbusRtuParams
    {
        private string com = "COM1";
        [DisplayName("COM")]
        [Category("连接参数")]
        [Description("")]
        public string Com
        {
            get
            {
                return com;
            }
            set
            {
                com = value;
            }
        }


        private int baudRate = 9600;
        [DisplayName("波特率")]
        [Category("连接参数")]
        [Description("")]
        public int BaudRate
        {
            get
            {
                return baudRate;
            }
            set
            {
                baudRate = value;
            }
        }



        private int dataBits = 8;
        [DisplayName("数据位")]
        [Category("连接参数")]
        [Description("")]
        public int DataBits
        {
            get
            {
                return dataBits;
            }
            set
            {
                dataBits = value;
            }
        }


        private StopBits _stopBits = StopBits.One;
        [DisplayName("停止位")]
        [Category("连接参数")]
        [Description("")]
        public StopBits _StopBits
        {
            get
            {
                return _stopBits;
            }
            set
            {
                _stopBits = value;
            }
        }


        private Parity _parity = Parity.None;
        [DisplayName("校验位")]
        [Category("连接参数")]
        [Description("")]
        public Parity _Parity
        {
            get
            {
                return _parity;
            }
            set
            {
                _parity = value;
            }
        }


        private int photoCam = 0;
        [DisplayName("拍照")]
        [Category("通讯参数")]
        [Description("")]
        public int PhotoCam
        {
            get
            {
                return photoCam;
            }
            set
            {
                photoCam = value;
            }
        }


        private int result = 0;
        [DisplayName("结果")]
        [Category("通讯参数")]
        [Description("")]
        public int Result
        {
            get
            {
                return result;
            }
            set
            {
                result = value;
            }
        }


    }
}
